﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MainPage.master" AutoEventWireup="true" CodeFile="PurviewOperateManage.aspx.cs" Inherits="Manage_PurviewOperateManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/Manage/Js/PurviewOperateManage.js"></script>
<script type="text/javascript">
    ModelOfOperate = <%= new PurviewOperates().ToJsonString() %>;
    OperateEnumString = '<%=OperateEnumString %>';
</script>

<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center"  >
  <tr class="TableHeadRow">
    <td width="60" align="center">编号</td>
    <td align="left">资源操作名称</td>
    <td width="70" align="center">排序值</td>
    <td width="60" align="center">状态</td>
    <td width="120" align="center">创建日期</td>
    <td width="250" align="center">管理 [<a href="javascript:Add();" class="red">添加操作</a>] 
    [<a href="javascript:void(0);" onclick="GenerateOperateEnum();"><font color="red"><b>生成资源操作枚举</b></font></a>]
    </td>
  </tr>

  <%
      if (listOfOperates != null)
      {
          for (int i = 0; i < listOfOperates.Count; ++i)
          {
              PurviewOperateInfo o = listOfOperates[i];
          
  %>
  <tr  onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';">
    <td align="center"><%=i+1 %>.</td>
    <td align="left"><a href="javascript:Edit(<%=o.OperateInfo.PurviewOperateID %>);"><%=o.OperateInfo.OperateName %></a> (被<span class="red bold"><%=o.UsedCounts%></span>个权限资源使用)</td>
    <td align="center"><%=o.OperateInfo.OrderValue%></td>
    <td align="center"><%=o.OperateInfo.Status%></td>
    <td align="center"><%=o.OperateInfo.CreateDate.ToString("yyyy-MM-dd HH:mm:ss")%></td>
    <td align="center">[<a href="#" class="green">使用该操作的资源</a>] [<a href="javascript:Edit(<%=o.OperateInfo.PurviewOperateID %>);">编辑</a>] [<a href="javascript:Delete(<%=o.OperateInfo.PurviewOperateID %>)" class="red">删除</a>]    </td>
  </tr>
 
  <%}
      }
      else
      { %>
  <tr>
    <td colspan="6" align="center" class="red">[ 未找到任何信息！]</td>
    </tr>
    <%} %>
</table>







</asp:Content>

